using UnityEngine;

[CreateAssetMenu(menuName = "RPG Setup/Item Data/ItemEffect/Heal", fileName = "Item effect data - Heal ")]
public class ItemEffect_Heal : ItemEffect_DataSO
{
    [SerializeField] private float healPercent = .1f;
    public override void ApplyEffect()
    {
        Player player = FindAnyObjectByType<Player>();
        
        float healthRegen = player.playerStats.GetMaxHealth() * healPercent;

        player.playerHealth.IncreaseHealth(healthRegen);
    }
}
